Skip to content

feat: harness gate — clarify/validate PostToolUse requirement check (#50)#53

Merged
rlaope merged 2 commits intomainfrom
feat/issue-50
Apr 9, 2026
Merged

feat: harness gate — clarify/validate PostToolUse requirement check (#50)#53
rlaope merged 2 commits intomainfrom
feat/issue-50

Conversation

@rlaope
Copy link
Copy Markdown
Owner

@rlaope rlaope commented Apr 9, 2026

Closes #50

Summary

  • PostToolUse hook checks clarify/validate state after every Write|Edit
  • clarify: warns about open requirement gaps (e.g. "2 open gap(s) remaining")
  • validate: warns on REJECTED/WEAK verdicts with score
  • Accumulates stats to .bestwork/state/harness-stats.json (checksRun, warningsIssued, requirementsMet, requirementsMissed)

Test plan

  • Hook outputs correct JSON for REJECTED validate state
  • Hook outputs correct warnings for clarify open gaps
  • Hook silent on non-Write/Edit tools (Bash passthrough)
  • Stats accumulate correctly across runs
  • 기존 687 tests 전부 통과
  • Build + plugin sync 성공

rlaope added 2 commits April 9, 2026 11:07
)

PostToolUse hook that checks .bestwork/state/clarify.json and
validate.json after every Write|Edit. Warns when open requirements
gaps exist or when building a feature that failed validation.
Accumulates gate statistics to harness-stats.json.

- hooks/bestwork-requirement-check.sh with clarify + validate checks
- hooks.json updated with new PostToolUse command hook
- .bestwork/state/harness-stats.json tracks checksRun, warningsIssued, requirementsMet/Missed

Signed-off-by: rlaope <rlaope@users.noreply.github.com>
- Fix CRITICAL jq operator precedence: (.openGaps // []) | length
- Add JSON integrity check before jq operations on harness-stats.json
- Document race condition as accepted limitation (stats are informational)
- Remove unused OVERALL variable in clarify section
- Fix printf formatting for output

Signed-off-by: rlaope <rlaope@users.noreply.github.com>
@rlaope rlaope merged commit 6d8efa0 into main Apr 9, 2026
2 checks passed
@rlaope rlaope deleted the feat/issue-50 branch April 9, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: harness gate 강화 — clarify→PostToolUse 자동 요구사항 검증

1 participant